home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / !applications! / phxassv4.36 / macropackages / maxonasm.i next >
Text File  |  1997-03-01  |  3KB  |  232 lines

  1. *****************************************************************
  2. *                                                               *
  3. *       MaxonAsm.i                                              *
  4. *                                                               *
  5. *       PhxAss macro extension for MaxonAsm compatibility       *
  6. *                                                               *
  7. *****************************************************************
  8. *
  9. *       $VER: MaxonAsm.i 1.0 (12.02.97)
  10. *       (C) 1997 Frank Wille -- All rights reserved
  11. *
  12. *****************************************************************
  13.  
  14.         IFND    _MAXONASM_I
  15. _MAXONASM_I    set    -1
  16.  
  17.  
  18. align        MACRO            ; align.<w/l> -> cnop 0,<2/4>
  19.         IFC     "\0","L"
  20.         cnop    0,4
  21.         ELSE
  22.         IFC    "\0","W"
  23.         even
  24.         ENDC
  25.         ENDC
  26.         ENDM
  27.  
  28. basereg        MACRO            ; base relative addressing
  29.         IFC    "\1","OFF"
  30.         far
  31.         ELSE
  32.         IFC    "\1","off"
  33.         far
  34.         ELSE
  35.         echo    "BASEREG An,<base> is not supported. Please use NEAR directive instead."
  36.         fail
  37.         ENDC
  38.         ENDC
  39.         ENDM
  40.  
  41. cstr        MACRO            ; define 0-terminated strings
  42.         rept    NARG
  43.         dc.b    \+,0
  44.         endr
  45.         ENDM
  46.  
  47. cstring        MACRO
  48.         rept    NARG
  49.         dc.b    \+,0
  50.         endr
  51.         ENDM
  52.  
  53. date        MACRO
  54.         dc.b    "XX.XX.XX"
  55.         echo    "DATE is currently not supported."
  56.         ENDM
  57.  
  58. db        MACRO
  59.         rept    NARG
  60.         dc.b    \+
  61.         endr
  62.         ENDM
  63.  
  64. dw        MACRO
  65.         rept    NARG
  66.         dc.w    \+
  67.         endr
  68.         ENDM
  69.  
  70. dl        MACRO
  71.         rept    NARG
  72.         dc.l    \+
  73.         endr
  74.         ENDM
  75.  
  76. entry        MACRO
  77.         rept    NARG
  78.         xdef    \+
  79.         endr
  80.         ENDM
  81.  
  82. extern        MACRO
  83.         rept    NARG
  84.         xref    \+
  85.         endr
  86.         ENDM
  87.  
  88. equate        MACRO
  89.         echo    "EQUATE no supported! Please use EQU."
  90.         fail
  91.         ENDM
  92.  
  93. ibytes        MACRO
  94.         incbin    \1
  95.         IFGE    NARG-2
  96.         echo    "Size parameter in IBYTES <file>,<size> ignored!"
  97.         ENDC
  98.         ENDM
  99.  
  100. identify    MACRO
  101.         idnt    \1
  102.         ENDM
  103.  
  104. program        MACRO
  105.         idnt    \1
  106.         ENDM
  107.  
  108. mexp        MACRO
  109.         ;
  110.         ENDM
  111.  
  112. nomexp        MACRO
  113.         ;
  114.         ENDM
  115.  
  116. nocommarkers    MACRO
  117.         ;
  118.         ENDM
  119.  
  120. odderr        MACRO
  121.         ;
  122.         ENDM
  123.  
  124. oddok        MACRO
  125.         ;
  126.         ENDM
  127.  
  128. text        MACRO
  129.         section    text,code
  130.         ENDM
  131.  
  132. ___pstr        MACRO
  133.         dc.b    2\@$-1\@$
  134. 1\@$:
  135.         dc.b    \1
  136. 2\@$:
  137.         ENDM
  138.  
  139. pstr        MACRO
  140.         rept    NARG
  141.         ___pstr    \+
  142.         endr
  143.         ENDM
  144.  
  145. pstring        MACRO
  146.         rept    NARG
  147.         ___pstr    \+
  148.         endr
  149.         ENDM
  150.  
  151. cend        MACRO
  152.         dc.w    $ffff,$fffe
  153.         ENDM
  154.  
  155. cmove        MACRO
  156.         dc.w    \2,\1
  157.         ENDM
  158.  
  159. clmove        MACRO
  160.         dc.w    \2,\1>>16,\2+2,\1&$ffff
  161.         ENDM
  162.  
  163. cwait        MACRO
  164.         dc.w    (\1<<8)|((\2&$1fc)>>1)|1
  165.         IFEQ    NARG-2
  166.         dc.w    $fffe
  167.         ELSE
  168.         IFEQ    NARG-3
  169.         IFC    "\3","BFD"
  170.         dc.w    $fffe
  171.         ELSE
  172.         IFC    "\3","bfd"
  173.         dc.w    $fffe
  174.         ELSE
  175.         dc.w    $7ffe
  176.         ENDC
  177.         ENDC
  178.         ELSE
  179.         IFEQ    NARG-5
  180.         IFC    "\5","BFD"
  181.         dc.w    $8000|((\3&$7f)<<8)|((\4&$1fc)>>1)
  182.         ELSE
  183.         IFC    "\5","bfd"
  184.         dc.w    $8000|((\3&$7f)<<8)|((\4&$1fc)>>1)
  185.         ELSE
  186.         dc.w    ((\3&$7f)<<8)|((\4&$1fc)>>1)
  187.         ENDC
  188.         ENDC
  189.         ELSE
  190.         echo    "cwait: illegal number of parameters."
  191.         ENDC
  192.         ENDC
  193.         ENDC
  194.         ENDC
  195.         ENDM
  196.  
  197. cskip        MACRO
  198.         dc.w    (\1<<8)|((\2&$1fc)>>1)|1
  199.         IFEQ    NARG-2
  200.         dc.w    $fffe
  201.         ELSE
  202.         IFEQ    NARG-3
  203.         IFC    "\3","BFD"
  204.         dc.w    $fffe
  205.         ELSE
  206.         IFC    "\3","bfd"
  207.         dc.w    $fffe
  208.         ELSE
  209.         dc.w    $7ffe
  210.         ENDC
  211.         ENDC
  212.         ELSE
  213.         IFEQ    NARG-5
  214.         IFC    "\5","BFD"
  215.         dc.w    $8000|((\3&$7f)<<8)|((\4&$1fc)>>1)|1
  216.         ELSE
  217.         IFC    "\5","bfd"
  218.         dc.w    $8000|((\3&$7f)<<8)|((\4&$1fc)>>1)|1
  219.         ELSE
  220.         dc.w    ((\3&$7f)<<8)|((\4&$1fc)>>1)|1
  221.         ENDC
  222.         ENDC
  223.         ELSE
  224.         echo    "cskip: illegal number of parameters."
  225.         ENDC
  226.         ENDC
  227.         ENDC
  228.         ENDC
  229.         ENDM
  230.  
  231.         ENDC
  232.